// JavaScript Document
function checkLoginForm()
{
	var username = document.getElementById("username");
	var password = document.getElementById("password");
	var validCode = document.getElementById("validCode");
	var s =	(/^\w+$/);
	var p =	(/[;'#]+/);
	if(username.value == '')
	{
		alert("username is required!");
		username.focus();
		return false;		
	}
	if(!s.test(username.value))
	{
		alert("Invalid inputs!");
		username.focus();
		return false;
	}
	if(password.value == '')
	{
		alert("password is required!");
		password.focus();
		return false;		
	}
	if(p.test(password.value))
	{
		alert("Invalid inputs!");
		password.focus();
		return false;
	}
	if(validCode.value == '')
	{
		alert("validcode is required!");
		validCode.focus();
		return false;		
	}
	else
		return true;
}
